import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Register from "@/views/Register";
import Login from "@/views/Login";
import UserDetail from "@/views/UserDetail";
import myMessage from "@/views/myMessage";

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'login',
        component: Login
    },
    {
        path: '/login',
        name: 'login',
        component: Login
    },
    {
        path : '/register',
        name: 'register',
        component: Register
    },
    {
        path: '/home',
        name: 'home',
        component: Home
    },
    {
        path: '/userdetail',
        name: 'userdetail',
        component: UserDetail
    },
    {
        path: '/myMessage',
        name: 'myMessage',
        component: myMessage
    },
]

const router = new VueRouter({
    mode: 'history',
    routes
})

export default router
